package com.farmpost.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 书籍表
 * </p>
 *
 * @author king
 * @since 2022-04-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Books对象", description="书籍表")
public class Books implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "书籍名")
    private String bookName;

    @ApiModelProperty(value = "书籍版本")
    private String bookVersion;

    @ApiModelProperty(value = "作者")
    private String bookAuthor;

    @ApiModelProperty(value = "出版社")
    private String bookPublish;

    @ApiModelProperty(value = "售价")
    private BigDecimal bookPrice;

    @ApiModelProperty(value = "书籍图片")
    private String bookPicture;

    @ApiModelProperty(value = "打折介绍")
    private String bookDiscount;

    @ApiModelProperty(value = "联系方式")
    private String contact;

    @ApiModelProperty(value = "1买书还是0卖书，")
    private Boolean sellOrBuy;

    @ApiModelProperty(value = "是否删除")
    @TableLogic
    private Integer deleted;

    private LocalDateTime dateTime;

    @ApiModelProperty(value = "预留字段")
    private String other;

    @ApiModelProperty(value = "买书or卖书")
    @TableField(exist = false)
    private String descSellBuy;

}
